{% load i18n %}
{% spaceless %}
<ul class="cms-pagetree-dropdown-menu-inner">
    <li
        {% if has_change_permission %}
            class="js-cms-tree-item-copy"
            data-id="{{ page.pk }}"
            data-apphook="{{ page.application_urls|default_if_none:"" }}"
        {% endif %}
    >
            <a{% if not has_change_permission %} class="cms-pagetree-dropdown-item-disabled"{% endif %} href="#" title="{% filter escapejs %}{% trans "Copy" %}{% endfilter %}">
                <span class="cms-icon cms-icon-copy"></span>
                <span>{% filter escapejs %}{% trans "Copy" %}{% endfilter %}<span>
            </a>
        </li>
    <li{% if has_move_page_permission %} class="js-cms-tree-item-cut"{% endif %}>
        <a{% if not has_move_page_permission %} class="cms-pagetree-dropdown-item-disabled"{% endif %}
            href="#" title="{% filter escapejs %}{% trans "Cut" %}{% endfilter %}">
            <span class="cms-icon cms-icon-scissors"></span>
            <span>{% filter escapejs %}{% trans "Cut" %}{% endfilter %}<span>
        </a>
    </li>
    <li>
        <a href="#" data-id="{{ page.pk }}"
            class="{% if has_add_permission %}js-cms-tree-item-paste{% endif %}
            {% if not has_add_permission or not paste_enabled %} cms-pagetree-dropdown-item-disabled{% endif %}">
            <span class="cms-icon cms-icon-alias"></span>
            <span>{% filter escapejs %}{% trans "Paste" %}{% endfilter %}</span>
        </a>
    </li>
    <li>
        {% if has_delete_permission %}
            <a href="{% url "admin:cms_page_delete" page.id %}?language={{ preview_language }}" title="{% filter escapejs %}{% trans "Delete" %}{% endfilter %}">
        {% else %}
            <a href="#" class="cms-pagetree-dropdown-item-disabled">
        {% endif %}
                <span class="cms-icon cms-icon-bin"></span>
                <span>{% filter escapejs %}{% trans "Delete" %}...{% endfilter %}</span>
            </a>
    </li>
    <li>
        {% if has_change_advanced_settings_permission %}
            <a href="{% url "admin:cms_page_advanced" page.id %}" title="{% filter escapejs %}{% trans "Advanced settings" %}{% endfilter %}">
        {% else %}
            <a href="#" class="cms-pagetree-dropdown-item-disabled">
        {% endif %}
                <span class="cms-icon cms-icon-cogs"></span>
                <span>{% filter escapejs %}{% trans "Advanced settings" %}{% endfilter %}</span>
            </a>
    </li>
    {% if CMS_PERMISSION %}
        <li>
            {% if has_change_permissions_permission %}
                <a href="{% url "admin:cms_page_permissions" page.id %}" title="{% filter escapejs %}{% trans "Permissions" %}{% endfilter %}">
            {% else %}
                <a href="#" class="cms-pagetree-dropdown-item-disabled">
            {% endif %}
                    <span class="cms-icon cms-icon-lock"></span>
                    <span>{% filter escapejs %}{% trans "Permissions" %}{% endfilter %}</span>
                </a>
        </li>
    {% endif %}
    <li class="cms-pagetree-dropdown-separator">&nbsp;</li>
    <li>
        {% if page.publication_date %}
            <p title="{% filter escapejs %}{% trans "publication date" %}{% endfilter %}: {{ page.publication_date|date:"Y-m-d" }}"><strong>{% filter escapejs %}{% trans "publication date" %}{% endfilter %}:</strong> {{ page.publication_date|date:"Y-m-d" }}</p>
        {% endif %}
        {% if page.publication_end_date %}
            <p title="{% filter escapejs %}{% trans "publication end date" %}{% endfilter %}: {{ page.publication_end_date|date:"Y-m-d" }}"><strong>{% filter escapejs %}{% trans "publication end date" %}{% endfilter %}:</strong> {{ page.publication_end_date|date:"Y-m-d" }}</p>
        {% endif %}
        <p title="{% filter escapejs %}{% trans "is restricted" %}: {% if page_is_restricted %}{% trans "Yes" %}{% else %}{% trans "No" %}{% endif %}{% endfilter %}">
            <strong>{% filter escapejs %}{% trans "is restricted" %}{% endfilter %}:</strong>
            {% if page_is_restricted %}
                {% filter escapejs %}{% trans "Yes" %}{% endfilter %}
            {% else %}
                {% filter escapejs %}{% trans "No" %}{% endfilter %}
            {% endif %}
        </p>
        {% if page.changed_by %}
            <p title="{% filter escapejs %}{% trans "last change by" %}{% endfilter %}: {{ page.changed_by }}"><strong>{% filter escapejs %}{% trans "last change by" %}{% endfilter %}:</strong> {{ page.changed_by }}</p>
        {% endif %}
        {% if page.get_template_display %}
            <p title="{% filter escapejs %}{% trans "template" %}{% endfilter %}: {{ page.get_template_display }}"><strong>{% filter escapejs %}{% trans "template" %}{% endfilter %}:</strong> {{ page.get_template_display }}</p>
        {% endif %}
        {% if metadata %}
            <p title="{% filter escapejs %}{% trans "meta" %}{% endfilter %}: {{ metadata }}"><strong>{% filter escapejs %}{% trans "meta" %}{% endfilter %}:</strong> {{ metadata }}</p>
        {% endif %}
        {% if page.site %}
            <p title="{% filter escapejs %}{% trans "site" %}{% endfilter %}: {{ page.site }}"><strong>{% filter escapejs %}{% trans "site" %}{% endfilter %}:</strong> {{ page.site }}</p>
        {% endif %}
    </li>
</ul>
{% endspaceless %}
